#ifndef CONSTANTS_H_
#define CONSTANTS_H_

#include <math.h>

namespace coolpool
{
	// Specifies how fine the collision detection step will be
	const double COLL_PRECISION = 1000.0;

	// Defines the minimal normal part of the collision  velocity.
	// (Resting contact)
	const double MIN_COLLISION_VELOCITY = 0.5;

	// The accuracy of the collision time during time step.
	const double BIN_SEARCH_ACCURACY = 1000;

	// Used for infinite loop prevention.
	const double LOG_BIN_SEARCH_ACCURACY = log(BIN_SEARCH_ACCURACY);
	const double MAX_STEPS_BIN_SEARCH = 3 * LOG_BIN_SEARCH_ACCURACY;

	// Zero tolerance
	const double EPSILON = 1.0e-6;

	// Set to false only while debugging, the threads and etc. are created and running anyway.
	const bool PARRALEL_COLLISION_DETECTION_ENABLED = true;

	// Init time step of the simulation.
	const double SIMULATION_INIT_TIME_STEP = 0.2;

	// The size of the world cell which is computed is then multiplied by this constant.
	const double WORLDCELL_SIZE_SCALE = 2.5;

	// Minimum force which is being processed.
	const double MINIMUM_FORCE = 0.05;
}
#endif
